<?php
/*
 * Page Name: doLogin page
 * Author: 
 * Created On : 05th December,2011
 * Modified On :
 * 
 */

include_once 'conn.php';
//error_reporting(1);
include_once 'clsEssentials.php';

$userName = addslashes($_REQUEST["txtUserName"]);
$Password = sha1(addslashes($_REQUEST["txtPassword"])); 

$myClass = new clsEssentials();
$userCount = $myClass->LoginProcess($userName,$Password);

if($userCount == 1)
{
	session_start();
	$_SESSION["UserName"] = $userName;
	//$_SESSION["UserId"] = "1";
	header("Location:admin-homepage.php");
}
else
{
	header("Location:admin-login.php?message=failure");
}
?>